//
// Created by xili on 2024/9/21 16:11.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int removeAlmostEqualCharacters(string s) {
        int ans = 0;
        for (int i = 1; i < s.length(); i++) {
            if (abs(s[i - 1] - s[i]) <= 1) {
                ans++;
                i++;
            }
        }
        return ans;
    }
};
